//
// Created by 成飞 on 2024/3/21.
//

#ifndef ORDERKV_CONFIG_DATA_H
#define ORDERKV_CONFIG_DATA_H

#include <string>

namespace conf{

    using std::string;

    struct dbStruct;
    struct value_storeStruct;
    struct lsmStruct;
    struct ConfData;

    extern ConfData data;
    extern void initConfData();

    struct dbStruct{
        string store_path;
        string vstore_path;
        string lsm_path;
        string meta_path;
        size_t scan_thread_num;
    };

    struct value_storeStruct{
        size_t buffer_size;
        int buffer_num;
        double garbage_tolerance;
    };

    struct lsmStruct{
        string db_engine;
    };

    struct ConfData{
        dbStruct db{};
        value_storeStruct value_store{};
        lsmStruct lsm{};
    };

}

#endif //ORDERKV_CONFIG_DATA_H
